package com.sayice.robotconflict.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.FieldType;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.io.Serializable;

/**
 * 玩家
 *
 * @author shubing
 */
@Getter
@Setter
@ToString
@Document("player")
public class PlayerEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**
     * ID
     */
    @MongoId(FieldType.OBJECT_ID)
    private String id;
    
    /**
     * 玩家名
     */
    private String name;
    
    /**
     * 密码
     */
    private String password;
    
    /**
     * 对局次数
     */
    private int gameNum;
    
    /**
     * 胜率 (%)
     */
    private int winRate;
}
